// const server_host = "http://192.168.20.155:28000"
// const server_host = "http://192.168.0.101:80"
// const server_host = "http://s0.nsloop.com:10784"
const server_host = "https://gxyj.njmsita.com:29000"
const file_host = server_host + "/oss"

const API = {
    SEPARATOR: "0123443210",
    WEB_REQUEST_HEADER: {},
    // websocket 地址
    WEB_SOCKET_HOST: server_host.replace("https", "wss") + "/im/",

    fILE_PROP_CHAT: "chat",
    fILE_PROP_APPOINTMENT: "appointment",

    // 登录
    LOGIN: server_host + "/user/applet/login",
    // 更新用户手机号
    UPDATE_USER_PHONE_NUMBER: server_host + "/user/applet/update/phone",
    // 更新用户信息
    UPDATE_USER_INFO: server_host + "/user/applet/update/info",
    // 更新用户类型
    UPDATE_USER_TYPE: server_host + "/user/applet/update/type",
    // 结束一个视频通话请求
    END_VIDEO_CALL: server_host + "/user/videocall/end",
    // 上报位置
    USER_LOCATION_REPORT:server_host + "/user/location/report",


    /**
     * 服务端 API
     */
    // 预约大厅，获取未处理的预约
    UNTREATED_APPOINTMENT_LIST: server_host + "/user/appointment/v/list/untreated",
    // 预约大厅，接受预约
    HANDLE_APPOINTMENT: server_host + "/user/appointment/v/handle",
    // 首页，查询已接受，处于正在进行中的预约
    PROCESSING_APPOINTMENT_V: server_host + "/user/appointment/v/processing",
    // 接受一个视频通话请求
    HANDLE_VIDEO_CALL: server_host + "/user/videocall/handle",


    /**
     * 求助端 API
     */
    // 发起一个预约
    CREATE_APPOINTMENT: server_host + "/user/appointment/h/create",
    // 查询未完成的预约
    UNCOMPLETED_APPOINTMENT: server_host + "/user/appointment/h/uncompleted",
    // 取消预约
    CANCEL_APPOINTMENT: server_host + "/user/appointment/h/cancel",
    // 发起一个视频通话请求
    CREATE_VIDEO_CALL: server_host + "/user/videocall/create",

    /**
     * 两端共用
     */
    // 发送聊天消息
    SEND_CHAT_MSG: server_host + "/user/chat/send",
    // 获取聊天消息
    GET_CHAT_LIST: server_host + '/user/chat/list',
    // 完成/结束预约
    COMPLETE_APPOINTMENT: server_host + "/user/appointment/complete",
    // 帮助/求助记录
    GET_RECORD_LIST: server_host + "/user/record/list",


    // 文件上传
    FILE_UPLOAD: file_host + "/upload",
    // 文件获取
    FILE_DOWNLOAD: file_host + "/download"
}

export default API;